from sympy import *

z = symbols('z')
h = 1 / (1 + exp(-z))
print(h)
dz = h.diff(z)
print(dz)
